# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Caleb Cushing <xenoterracide@gmail.com>

pkgname=perl-capture-tiny
_realname=Capture-Tiny
pkgver=0.46
pkgrel=4
pkgdesc="Capture STDOUT and STDERR from Perl, XS or external programs"
arch=(any)
license=(PerlArtistic GPL)
depends=(perl)
url="http://search.cpan.org/dist/Capture-Tiny"
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/$_realname-$pkgver.tar.gz")
sha256sums=('5d7a6a830cf7f2b2960bf8b8afaac16a537ede64f3023827acea5bd24ca77015')

build() {
  cd "$srcdir/$_realname-$pkgver"
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
	cd "$srcdir/$_realname-$pkgver"
	unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
	export PERL_MM_USE_DEFAULT=1
	make test
}

package() {
  cd "$srcdir/$_realname-$pkgver"
  make DESTDIR="$pkgdir" install
}
